/*
 * Created by Jaren at 2021/8/17 16:15
 */
class DateTimeUtil {
  static int current({bool ms = false, bool microSecond = false, bool second = false}) {
    /// 默认ms
    if (ms == false && microSecond == false && second == false) ms = true;

    /// milli seconds
    if (ms) return DateTime.now().millisecondsSinceEpoch;

    /// micro seconds
    if (microSecond) return DateTime.now().microsecondsSinceEpoch;

    /// seconds
    return DateTime.now().millisecondsSinceEpoch ~/ 1000;
  }
}
